<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        class Howed{
            constructor(name,age){
                this.name = name;
                this.age = age;
                this.any = ()=>{
                    console.log("buhao");
                }
            }
            han(){
                console.log("方法在原型上");
            }
            han1 = function(){
                console.log("方法在实例对象上");
            }
            static han3(){
                console.log("方法在构造函数上");
            }
            static key2 = "value2";
        }
        let howed1 = new Howed("小明",21);
        let howed2 = new Howed("小红",25);
        console.log(howed1);
        console.log(howed2);
        class Jicheng extends Howed{
            constructor(name,age,like){
                super(name,age);
                this.like = like;
            }
            zihan(){
                console.log("子类原型方法");
                super.han()
            }
            static zihan2(){
                console.log("子类构造函数");
                super.han3();
            }
        }
        let jicheng1 = new Jicheng("小刘",23,"打篮球");
        console.log(jicheng1);
        jicheng1.zihan();
        Jicheng.zihan2()
    </script>
</body>
</html>